﻿(function ($, undefined) {
    if ($.ui && $.ui.dialog) {
        $.ui.dialog.overlay.events = $.map('focus,keydown,keypress'.split(','), function (event) { return event + '.dialog-overlay'; }).join(' ');
    }
} (jQuery));

$(function () {
    $(".button").button();

    $('.changeToLocalDateTime').each(function () {
        var str = $(this).html() + " UTC";
        var utc = new Date(Date.parse(str, 'MM/dd/yyyy HH:mm'));
        $(this).html(utc.toLocaleDateString() + '  ' + utc.toLocaleTimeString());
    });

    $(document).keydown(function (e) {
        var element = e.target.nodeName.toLowerCase();
        if (element != 'input' && element != 'textarea') {
            if (e.keyCode === 8) {
                return false;
            }
        }
    });
});

function filterList() {
    var form = document.forms[0];
    form.submit();
}